using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Xid.Controls
{
    public partial class LabelNupCtrl : UserControl
    {
        

        public string Label
        {
            get { return this.label.Text; }
            set { this.label.Text = value; }
        }


        [Bindable(true, BindingDirection.TwoWay)]
        public decimal Value
        {
            get { return numericUpDown1.Value; }
            set { numericUpDown1.Value = value; }
        }


        public LabelNupCtrl()
        {
            InitializeComponent();
            this.numericUpDown1.ValueChanged += new EventHandler(numericUpDown1_ValueChanged);
        }

        void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            OnValueChanged();
        }

        public event EventHandler ValueChanged;
        protected virtual void OnValueChanged()
        {
            if (this.ValueChanged != null)
                this.ValueChanged(this, new EventArgs());
        }

    }
}
